#!/bin/bash
#
MARCIMPORT=/usr/local/marcimport
SABRE=/usr/local/vufind-smu
# Disable JETTY_CONSOLE output -- it causes problems when run by cron:
export JETTY_CONSOLE=/dev/null
#
date

#################################
# pre-process Brighton files
cd $MARCIMPORT/full/
rm -r brightonprocessed.old
cp -pr brightonprocessed brightonprocessed.old
for i in 1 2 3 4 5 6 7 8 9 10
do
  $SABRE/marc_merge_vufind.pl brightonincoming/grabbed.bibsg$i.mrc brightonprocessed/brighton$i.mrc brighton > brightonprocessed/out$i &
  echo Pre-processing Brighton file $i
  date
  sleep 200
done
date
